/* Description: inotify()测试
 * Author: zhouhui
 * Release Date: 2014-08-25
 * Modify log: 2014-08-31 
 */ 

#include <stdio.h>
#include <errno.h>
#include <poll.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/inotify.h>
#include <unistd.h>

int main(int argc,  char **argv)
{
    int ifd = inotify_init();
    if (ifd == -1)
    {
        perror("init");
        return 1;
    }

    if (inotify_add_watch(ifd, argv[1],32) == -1)
    {
        perror("add");
        return 1;
    }
    return 0;
}
